<!DOCTYPE html>
<html>
  
  <head>
    <meta charset="UTF-8">
    <title>财合税后台管理</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
    <link rel="stylesheet" href="${path}/css/font.css">
    <link rel="stylesheet" href="${path}/css/xadmin.css">
    <script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
    <script type="text/javascript" src="${path}/lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="${path}/js/xadmin.js"></script>
    <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
    <!--[if lt IE 9]>
      <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
      <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
  </head>
  
  <body>
    <div class="x-body">
        <form class="layui-form">
          <div class="layui-form-item">
              <label for="username" class="layui-form-label">
                  <span class="x-red">*</span>账号
              </label>
              <div class="layui-input-inline">
                  <input type="text" id="username" name="username" required="" lay-verify="required"
                  autocomplete="off" class="layui-input">
              </div>
          </div>
          <div class="layui-form-item">
              <label for="phone" class="layui-form-label">
                  <span class="x-red">*</span>姓名
              </label>
              <div class="layui-input-inline">
                  <input type="text" id="phone" name="phone" required="" lay-verify="phone"
                  autocomplete="off" class="layui-input">
              </div>
          </div>
          <div class="layui-form-item">
              <label for="password" class="layui-form-label">
                  <span class="x-red">*</span>密码
              </label>
              <div class="layui-input-inline">
                  <input type="text" id="password" name="password" required="" lay-verify="email"
                  autocomplete="off" class="layui-input">
              </div>
          </div>
          <div class="layui-form-item">
              <label class="layui-form-label"><span class="x-red">*</span>角色组</label>
              <div class="layui-input-block">
                <input type="radio" name="like1[write]" lay-skin="primary" title="系统管理员" checked="">
                <input type="radio" name="like1[write]" lay-skin="primary" title="客服">
                <input type="radio" name="like1[write]" lay-skin="primary" title="运营">
              </div>
          </div>
            <div class="layui-form-item layui-form-text">
                <label class="layui-form-label"><span class="x-red">*</span>权限</label>
                <table class="layui-table layui-input-block" style="width: auto">
                    <tbody>
                    <tr>
                        <td style="padding: 0;border: none">
                            <div class="layui-input-block" style="margin-left: 0">
                                <input name="id[]" lay-skin="primary" type="checkbox" title="系统管理" value="2"><div class="layui-unselect layui-form-checkbox" lay-skin="primary"><span>系统管理</span><i class="layui-icon"></i></div>
                                <input name="id[]" lay-skin="primary" type="checkbox" value="2" title="日报"><div class="layui-unselect layui-form-checkbox" lay-skin="primary"><span>日报</span><i class="layui-icon"></i></div>
                                <input name="id[]" lay-skin="primary" type="checkbox" value="2" title="管理员"><div class="layui-unselect layui-form-checkbox" lay-skin="primary"><span>管理员</span><i class="layui-icon"></i></div>
                                <input name="id[]" lay-skin="primary" type="checkbox" value="2" title="用户管理"><div class="layui-unselect layui-form-checkbox" lay-skin="primary"><span>用户管理</span><i class="layui-icon"></i></div>
                                <input name="id[]" lay-skin="primary" type="checkbox" value="2" title="会员管理"><div class="layui-unselect layui-form-checkbox" lay-skin="primary"><span>会员管理</span><i class="layui-icon"></i></div>
                                <input name="id[]" lay-skin="primary" type="checkbox" value="2" title="专家管理"><div class="layui-unselect layui-form-checkbox" lay-skin="primary"><span>专家管理</span><i class="layui-icon"></i></div>
                                <input name="id[]" lay-skin="primary" type="checkbox" value="2" title="经纪人管理"><div class="layui-unselect layui-form-checkbox" lay-skin="primary"><span>经纪人管理</span><i class="layui-icon"></i></div>
                                <input name="id[]" lay-skin="primary" type="checkbox" value="2" title="订单管理"><div class="layui-unselect layui-form-checkbox" lay-skin="primary"><span>订单管理</span><i class="layui-icon"></i></div>
                                <input name="id[]" lay-skin="primary" type="checkbox" value="2" title="线上订单"><div class="layui-unselect layui-form-checkbox" lay-skin="primary"><span>线上订单</span><i class="layui-icon"></i></div>
                                <input name="id[]" lay-skin="primary" type="checkbox" value="2" title="服务订单"><div class="layui-unselect layui-form-checkbox" lay-skin="primary"><span>服务订单</span><i class="layui-icon"></i></div>
                                <input name="id[]" lay-skin="primary" type="checkbox" value="2" title="问答管理"><div class="layui-unselect layui-form-checkbox" lay-skin="primary"><span>问答管理</span><i class="layui-icon"></i></div>
                                <input name="id[]" lay-skin="primary" type="checkbox" value="2" title="问题管理"><div class="layui-unselect layui-form-checkbox" lay-skin="primary"><span>问题管理</span><i class="layui-icon"></i></div>
                                <input name="id[]" lay-skin="primary" type="checkbox" value="2" title="问题审核"><div class="layui-unselect layui-form-checkbox" lay-skin="primary"><span>问题审核</span><i class="layui-icon"></i></div>
                                <input name="id[]" lay-skin="primary" type="checkbox" value="2" title="产品管理"><div class="layui-unselect layui-form-checkbox" lay-skin="primary"><span>产品管理</span><i class="layui-icon"></i></div>
                                <input name="id[]" lay-skin="primary" type="checkbox" value="2" title="产品列表"><div class="layui-unselect layui-form-checkbox" lay-skin="primary"><span>产品列表</span><i class="layui-icon"></i></div>
                                <input name="id[]" lay-skin="primary" type="checkbox" value="2" title="添加产品"><div class="layui-unselect layui-form-checkbox" lay-skin="primary"><span>添加产品</span><i class="layui-icon"></i></div>
                                <input name="id[]" lay-skin="primary" type="checkbox" value="2" title="产品类型管理"><div class="layui-unselect layui-form-checkbox" lay-skin="primary"><span>产品类型管理</span><i class="layui-icon"></i></div>
                                <input name="id[]" lay-skin="primary" type="checkbox" value="2" title="课程管理"><div class="layui-unselect layui-form-checkbox" lay-skin="primary"><span>课程管理</span><i class="layui-icon"></i></div>
                                <input name="id[]" lay-skin="primary" type="checkbox" value="2" title="单节课程"><div class="layui-unselect layui-form-checkbox" lay-skin="primary"><span>单节课程</span><i class="layui-icon"></i></div>
                                <input name="id[]" lay-skin="primary" type="checkbox" value="2" title="系列课程"><div class="layui-unselect layui-form-checkbox" lay-skin="primary"><span>系列课程</span><i class="layui-icon"></i></div>
                                <input name="id[]" lay-skin="primary" type="checkbox" value="2" title="直播课程"><div class="layui-unselect layui-form-checkbox" lay-skin="primary"><span>直播课程</span><i class="layui-icon"></i></div>
                                <input name="id[]" lay-skin="primary" type="checkbox" value="2" title="添加课程"><div class="layui-unselect layui-form-checkbox" lay-skin="primary"><span>添加课程</span><i class="layui-icon"></i></div>
                                <input name="id[]" lay-skin="primary" type="checkbox" value="2" title="课程类型管理"><div class="layui-unselect layui-form-checkbox" lay-skin="primary"><span>课程类型管理</span><i class="layui-icon"></i></div>
                                <input name="id[]" lay-skin="primary" type="checkbox" value="2" title="知识管理"><div class="layui-unselect layui-form-checkbox" lay-skin="primary"><span>知识管理</span><i class="layui-icon"></i></div>
                                <input name="id[]" lay-skin="primary" type="checkbox" value="2" title="知识列表"><div class="layui-unselect layui-form-checkbox" lay-skin="primary"><span>知识列表</span><i class="layui-icon"></i></div>
                                <input name="id[]" lay-skin="primary" type="checkbox" value="2" title="小税法知识"><div class="layui-unselect layui-form-checkbox" lay-skin="primary"><span>小税法知识</span><i class="layui-icon"></i></div>
                                <input name="id[]" lay-skin="primary" type="checkbox" value="2" title="添加知识"><div class="layui-unselect layui-form-checkbox" lay-skin="primary"><span>添加知识</span><i class="layui-icon"></i></div>
                                <input name="id[]" lay-skin="primary" type="checkbox" value="2" title="知识类型管理"><div class="layui-unselect layui-form-checkbox" lay-skin="primary"><span>知识类型管理</span><i class="layui-icon"></i></div>
                                <input name="id[]" lay-skin="primary" type="checkbox" value="2" title="运营管理"><div class="layui-unselect layui-form-checkbox" lay-skin="primary"><span>运营管理</span><i class="layui-icon"></i></div>
                                <input name="id[]" lay-skin="primary" type="checkbox" value="2" title="banner"><div class="layui-unselect layui-form-checkbox" lay-skin="primary"><span>banner</span><i class="layui-icon"></i></div>
                                <input name="id[]" lay-skin="primary" type="checkbox" value="2" title="会员卡管理"><div class="layui-unselect layui-form-checkbox" lay-skin="primary"><span>会员卡管理</span><i class="layui-icon"></i></div>
                                <input name="id[]" lay-skin="primary" type="checkbox" value="2" title="优惠券管理"><div class="layui-unselect layui-form-checkbox" lay-skin="primary"><span>优惠券管理</span><i class="layui-icon"></i></div>
                                <input name="id[]" lay-skin="primary" type="checkbox" value="2" title="首页模块管理"><div class="layui-unselect layui-form-checkbox" lay-skin="primary"><span>首页模块管理</span><i class="layui-icon"></i></div>
                                <input name="id[]" lay-skin="primary" type="checkbox" value="2" title="添加banner"><div class="layui-unselect layui-form-checkbox" lay-skin="primary"><span>添加banner</span><i class="layui-icon"></i></div>
                                <input name="id[]" lay-skin="primary" type="checkbox" value="2" title="生成会员卡"><div class="layui-unselect layui-form-checkbox" lay-skin="primary"><span>生成会员卡</span><i class="layui-icon"></i></div>
                                <input name="id[]" lay-skin="primary" type="checkbox" value="2" title="添加优惠券"><div class="layui-unselect layui-form-checkbox" lay-skin="primary"><span>添加优惠券</span><i class="layui-icon"></i></div>
                                <input name="id[]" lay-skin="primary" type="checkbox" value="2" title="编辑模块"><div class="layui-unselect layui-form-checkbox" lay-skin="primary"><span>编辑模块</span><i class="layui-icon"></i></div>
                            </div>
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div>
            <div class="layui-form-item">
                <label for="" class="layui-form-label">
                </label>
                <button class="layui-btn" lay-filter="add" lay-submit="">
                    增加
                </button>
            </div>
      </form>
    </div>
    <script>
        layui.use(['form','layer'], function(){
            $ = layui.jquery;
          var form = layui.form
          ,layer = layui.layer;
        
          //自定义验证规则
          form.verify({
            nikename: function(value){
              if(value.length < 5){
                return '昵称至少得5个字符啊';
              }
            }
            ,pass: [/(.+){6,12}$/, '密码必须6到12位']
            ,repass: function(value){
                if($('#L_pass').val()!=$('#L_repass').val()){
                    return '两次密码不一致';
                }
            }
          });

          //监听提交
          form.on('submit(add)', function(data){
            console.log(data);
            //发异步，把数据提交给php
            layer.alert("增加成功", {icon: 6},function () {
                // 获得frame索引
                var index = parent.layer.getFrameIndex(window.name);
                //关闭当前frame
                parent.layer.close(index);
            });
            return false;
          });
          
          
        });
    </script>
    <script>var _hmt = _hmt || []; (function() {
        var hm = document.createElement("script");
        hm.src = "https://hm.baidu.com/hm.js?b393d153aeb26b46e9431fabaf0f6190";
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(hm, s);
      })();</script>
  </body>

</html>